package com.ruoyi.enterprise.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.enterprise.mapper.ComHolderBefore10Mapper;
import com.ruoyi.enterprise.domain.ComHolderBefore10;
import com.ruoyi.enterprise.service.IComHolderBefore10Service;

/**
 * 十大股东Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-03-08
 */
@Service
public class ComHolderBefore10ServiceImpl implements IComHolderBefore10Service 
{
    @Autowired
    private ComHolderBefore10Mapper comHolderBefore10Mapper;

    /**
     * 查询十大股东
     * 
     * @param id 十大股东主键
     * @return 十大股东
     */
    @Override
    public ComHolderBefore10 selectComHolderBefore10ById(Long id)
    {
        return comHolderBefore10Mapper.selectComHolderBefore10ById(id);
    }

    /**
     * 查询十大股东列表
     * 
     * @param comHolderBefore10 十大股东
     * @return 十大股东
     */
    @Override
    public List<ComHolderBefore10> selectComHolderBefore10List(ComHolderBefore10 comHolderBefore10)
    {
        return comHolderBefore10Mapper.selectComHolderBefore10List(comHolderBefore10);
    }

    /**
     * 新增十大股东
     * 
     * @param comHolderBefore10 十大股东
     * @return 结果
     */
    @Override
    public int insertComHolderBefore10(ComHolderBefore10 comHolderBefore10)
    {
        return comHolderBefore10Mapper.insertComHolderBefore10(comHolderBefore10);
    }

    /**
     * 修改十大股东
     * 
     * @param comHolderBefore10 十大股东
     * @return 结果
     */
    @Override
    public int updateComHolderBefore10(ComHolderBefore10 comHolderBefore10)
    {
        comHolderBefore10.setUpdateTime(DateUtils.getNowDate());
        return comHolderBefore10Mapper.updateComHolderBefore10(comHolderBefore10);
    }

    /**
     * 批量删除十大股东
     * 
     * @param ids 需要删除的十大股东主键
     * @return 结果
     */
    @Override
    public int deleteComHolderBefore10ByIds(Long[] ids)
    {
        return comHolderBefore10Mapper.deleteComHolderBefore10ByIds(ids);
    }

    /**
     * 删除十大股东信息
     * 
     * @param id 十大股东主键
     * @return 结果
     */
    @Override
    public int deleteComHolderBefore10ById(Long id)
    {
        return comHolderBefore10Mapper.deleteComHolderBefore10ById(id);
    }
}
